Comment on the output of this C code? int main() { int a[5] = {1, 2, 3, 4, 5}; int i; for (i = 0; i < 5; i++) if ((char)a[i] == '5') printf("%d ", a[i]); else printf("FAIL "); }
1.The compiler will flag an error
2.Program will compile and print the output 5
3.Program will compile and print the ASCII value of 5
4.Program will compile and print FAIL for 5 times
Posted Date:-2022-03-21 14:48:52